package com.bac.rentmap.ad.flat.rating.update;

import com.bac.rentmap.ad.flat.FlatAd;

/**
 * Updates FlatAd properties and recalculates rating.
 *
 * @author Andrew Osipenko
 */
public interface RatingAwareFlatAdUpdater {
    FlatAd update(String secureId);

    RatingEstimation estimateRatingAfterUpdate(String secureId);
}

class RatingEstimation {
    private long newRating;
    private long oldRating;

    public RatingEstimation(long newRating, long oldRating) {
        this.newRating = newRating;
        this.oldRating = oldRating;
    }

    public long getNewRating() {
        return newRating;
    }

    public long getOldRating() {
        return oldRating;
    }
}
